package com.carlwang.security;

import java.util.Hashtable;

public class BinaryToTextEncoders {
	public static String CLASS_VERSION = "$Id: //product/DAS/version/10.1.2/Java/atg/security/BinaryToTextEncoders.java#1 $$Change: 713790 $";
	/*     */
	/* 81 */private static Hashtable sEncoders = new Hashtable(17);

	/*     */
	/*     */public static void addBinaryToTextEncoder(String pName,
			BinaryToTextEncoder pNewEncoder)
	/*     */{
		/* 95 */sEncoders.put(pName, pNewEncoder);
		/*     */}

	/*     */
	/*     */public static BinaryToTextEncoder getBinaryToTextEncoder(String pName)
	/*     */{
		/* 100 */return ((BinaryToTextEncoder) sEncoders.get(pName));
		/*     */}

	/*     */
	/*     */public static String encode(String pMethod, byte[] pValue)
	/*     */{
		/* 111 */BinaryToTextEncoder encoder = (BinaryToTextEncoder) sEncoders
				.get(pMethod);
		/* 112 */if (encoder == null)
			/* 113 */throw new IllegalArgumentException(pMethod);
		/* 114 */return encoder.encode(pValue);
		/*     */}

	/*     */
	/*     */static
	/*     */{

		/* 84 */addBinaryToTextEncoder("base16", new Base16Encoder());

		/*     */}
}
